﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 仓库表基础输入参数
/// </summary>
public class WarehouseModelBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 仓库编码
    /// </summary>
    [Required(ErrorMessage = "仓库编码不能为空")]
    public virtual string WareCode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    [Required(ErrorMessage = "仓库名称不能为空")]
    public virtual string WareName { get; set; }
    
    /// <summary>
    /// 仓库容量
    /// </summary>
    [Required(ErrorMessage = "仓库容量不能为空")]
    public virtual int? WareVolume { get; set; }
    
    /// <summary>
    /// 库管部门
    /// </summary>
    public virtual long? DepartmentId { get; set; }
    
    /// <summary>
    /// 仓库主管
    /// </summary>
    public virtual long? UserId { get; set; }
    
    /// <summary>
    /// 仓库地址
    /// </summary>
    public virtual string? WareAddr { get; set; }
    
    /// <summary>
    /// 仓库状态
    /// </summary>
    [Required(ErrorMessage = "仓库状态不能为空")]
    public virtual bool? WareType { get; set; }
    
    /// <summary>
    /// 仓库锁定
    /// </summary>
    [Required(ErrorMessage = "仓库锁定不能为空")]
    public virtual bool? WareLock { get; set; }
    
    /// <summary>
    /// 仓库备注
    /// </summary>
    public virtual string? WareNote { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public virtual DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 仓库表分页查询输入参数
/// </summary>
public class PageWarehouseModelInput : BasePageInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    public string WareCode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public string WareName { get; set; }
    
    /// <summary>
    /// 仓库容量
    /// </summary>
    public int? WareVolume { get; set; }
    
    /// <summary>
    /// 库管部门
    /// </summary>
    public long? DepartmentId { get; set; }
    
    /// <summary>
    /// 仓库主管
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库地址
    /// </summary>
    public string? WareAddr { get; set; }
    
    /// <summary>
    /// 仓库状态
    /// </summary>
    public bool? WareType { get; set; }
    
    /// <summary>
    /// 仓库锁定
    /// </summary>
    public bool? WareLock { get; set; }
    
    /// <summary>
    /// 仓库备注
    /// </summary>
    public string? WareNote { get; set; }
    
    /// <summary>
    /// 软删除时间范围
    /// </summary>
     public DateTime?[] DeleteTimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 仓库表增加输入参数
/// </summary>
public class AddWarehouseModelInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    [Required(ErrorMessage = "仓库编码不能为空")]
    [MaxLength(64, ErrorMessage = "仓库编码字符长度不能超过64")]
    public string WareCode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    [Required(ErrorMessage = "仓库名称不能为空")]
    [MaxLength(128, ErrorMessage = "仓库名称字符长度不能超过128")]
    public string WareName { get; set; }
    
    /// <summary>
    /// 仓库容量
    /// </summary>
    [Required(ErrorMessage = "仓库容量不能为空")]
    public int? WareVolume { get; set; }
    
    /// <summary>
    /// 库管部门
    /// </summary>
    public long? DepartmentId { get; set; }
    
    /// <summary>
    /// 仓库主管
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库地址
    /// </summary>
    [MaxLength(256, ErrorMessage = "仓库地址字符长度不能超过256")]
    public string? WareAddr { get; set; }
    
    /// <summary>
    /// 仓库状态
    /// </summary>
    [Required(ErrorMessage = "仓库状态不能为空")]
    public bool? WareType { get; set; }
    
    /// <summary>
    /// 仓库锁定
    /// </summary>
    [Required(ErrorMessage = "仓库锁定不能为空")]
    public bool? WareLock { get; set; }
    
    /// <summary>
    /// 仓库备注
    /// </summary>
    [MaxLength(512, ErrorMessage = "仓库备注字符长度不能超过512")]
    public string? WareNote { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 仓库表删除输入参数
/// </summary>
public class DeleteWarehouseModelInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 仓库表更新输入参数
/// </summary>
public class UpdateWarehouseModelInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 仓库编码
    /// </summary>    
    [Required(ErrorMessage = "仓库编码不能为空")]
    [MaxLength(64, ErrorMessage = "仓库编码字符长度不能超过64")]
    public string WareCode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>    
    [Required(ErrorMessage = "仓库名称不能为空")]
    [MaxLength(128, ErrorMessage = "仓库名称字符长度不能超过128")]
    public string WareName { get; set; }
    
    /// <summary>
    /// 仓库容量
    /// </summary>    
    [Required(ErrorMessage = "仓库容量不能为空")]
    public int? WareVolume { get; set; }
    
    /// <summary>
    /// 库管部门
    /// </summary>    
    public long? DepartmentId { get; set; }
    
    /// <summary>
    /// 仓库主管
    /// </summary>    
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库地址
    /// </summary>    
    [MaxLength(256, ErrorMessage = "仓库地址字符长度不能超过256")]
    public string? WareAddr { get; set; }
    
    /// <summary>
    /// 仓库状态
    /// </summary>    
    [Required(ErrorMessage = "仓库状态不能为空")]
    public bool? WareType { get; set; }
    
    /// <summary>
    /// 仓库锁定
    /// </summary>    
    [Required(ErrorMessage = "仓库锁定不能为空")]
    public bool? WareLock { get; set; }
    
    /// <summary>
    /// 仓库备注
    /// </summary>    
    [MaxLength(512, ErrorMessage = "仓库备注字符长度不能超过512")]
    public string? WareNote { get; set; }
    /// <summary>
    /// 库位编号
    /// </summary>
    [MaxLength(256, ErrorMessage = "库位编号字符长度不能超过512")]
    public string? WarePlaceId { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>    
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 仓库表主键查询输入参数
/// </summary>
public class QueryByIdWarehouseModelInput : DeleteWarehouseModelInput
{
}

/// <summary>
/// 仓库表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportWarehouseModelInput : BaseImportInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    [ImporterHeader(Name = "*仓库编码")]
    [ExporterHeader("*仓库编码", Format = "", Width = 25, IsBold = true)]
    public string WareCode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    [ImporterHeader(Name = "*仓库名称")]
    [ExporterHeader("*仓库名称", Format = "", Width = 25, IsBold = true)]
    public string WareName { get; set; }
    
    /// <summary>
    /// 仓库容量
    /// </summary>
    [ImporterHeader(Name = "*仓库容量")]
    [ExporterHeader("*仓库容量", Format = "", Width = 25, IsBold = true)]
    public int? WareVolume { get; set; }
    
    /// <summary>
    /// 库管部门
    /// </summary>
    [ImporterHeader(Name = "库管部门")]
    [ExporterHeader("库管部门", Format = "", Width = 25, IsBold = true)]
    public long? DepartmentId { get; set; }
    
    /// <summary>
    /// 仓库主管
    /// </summary>
    [ImporterHeader(Name = "仓库主管")]
    [ExporterHeader("仓库主管", Format = "", Width = 25, IsBold = true)]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库地址
    /// </summary>
    [ImporterHeader(Name = "仓库地址")]
    [ExporterHeader("仓库地址", Format = "", Width = 25, IsBold = true)]
    public string? WareAddr { get; set; }
    
    /// <summary>
    /// 仓库状态
    /// </summary>
    [ImporterHeader(Name = "*仓库状态")]
    [ExporterHeader("*仓库状态", Format = "", Width = 25, IsBold = true)]
    public bool? WareType { get; set; }
    
    /// <summary>
    /// 仓库锁定
    /// </summary>
    [ImporterHeader(Name = "*仓库锁定")]
    [ExporterHeader("*仓库锁定", Format = "", Width = 25, IsBold = true)]
    public bool? WareLock { get; set; }
    
    /// <summary>
    /// 仓库备注
    /// </summary>
    [ImporterHeader(Name = "仓库备注")]
    [ExporterHeader("仓库备注", Format = "", Width = 25, IsBold = true)]
    public string? WareNote { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    [ImporterHeader(Name = "软删除时间")]
    [ExporterHeader("软删除时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? DeleteTime { get; set; }
    
}
